package com.homestead.constant;

/**
 * redis 分布式锁用 key
 * @author yhb
 * @date 2021-03-10 18:09
 */
public class RedisLockKeyConstant {
    private static final String PROMOTION_PREFIX = "promotion:lock:";
    private static final String COUPON_PREFIX = "coupon:";
    private static final String BACK_PREFIX = "back:lock:";
    private static final String COUPON_THEME_PREFIX = "couponTheme:";
    private static final String ADAPT_ORG_PREFIX = "couponThemeAdaptOrg:";

    /**
     * 创建或更新券活动时添加组织的锁
     */
    public static final String WRITE_COUPON_THEME_ADAPT_ORG_DATABASE = BACK_PREFIX + "addOrUpdateOrg:all";
    /**
     * 单个券核销
     */
    public static final String WRITE_COUPON_DATABASE =PROMOTION_PREFIX + COUPON_PREFIX + "write:id:";
    /**
     * 同步coupon_theme数据库到couponThemeCache 锁
     */
    public static final String SYNC_COUPON_THEME_DATABASE_TO_CACHE =PROMOTION_PREFIX + COUPON_THEME_PREFIX + "sync:id:";
    public static final String SYNC_ADAPT_ORG_IDS_TO_CACHE =PROMOTION_PREFIX + ADAPT_ORG_PREFIX + "sync:id:";
}
